<%@ page import="com.xlro.service.BookService" %>
<%@ page import="com.xlro.domain.Book" %>
<%@ page import="com.xlro.util.MyDate" %>
<%--
  Created by IntelliJ IDEA.
  User: xlro
  Date: 2021/5/30
  Time: 16:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title><% session.getAttribute("username");%></title>
    <link rel="stylesheet" href="layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="jQuery/css/htmleaf-demo.css">
    <link rel="stylesheet" href="jQuery/css/style.css"/>
    <style>

        #top-image {
            background: linear-gradient(
                    rgba(0, 0, 0, 0.2),
                    rgba(0, 0, 0, 0.2)
            ), url('jQuery/images/1.jpg') no-repeat fixed;
            position:fixed ;
            top:0;
            width:100%;
            z-index:0;
            height:100%;
        }

        html, body {
            font-size: 14px;
            width: 100%;
            height: 100%;
            color: #fff;
        }
        input{
            color: #fff!important;
        }
        input::-webkit-input-placeholder{
            color: #fff!important;
        }

        .login-layout {
            position: absolute;
            width: 90%;
            left: 50%;
            top: 50%;
            border-radius: .75rem;
            transform: translate(-50%, -50%);
            background: rgba(204,142,103, 0.6);
            padding: 100px 80px 80px 50px;
            backdrop-filter: blur(10px);
            display: flex;
            justify-content: center;
            height: 66%;
        }

        .layui-input{
            padding: 5px;
            width: 90%;
            height: 90%;
            background-color: rgba(255,255,255, 0.3);
            border: 0;
        }

    </style>
</head>
<body>

<%@include file="alert.jsp"%>

<div id="top-image">
    <div class="login">
        <div class="login-layout">
<%--            <form class="layui-form" method="post" action="" style="position: relative;top:-30px;left: 30px">--%>
                <br>

                <%
//                    记录当前用户的浏览记录
                    request.setCharacterEncoding("utf-8");
                    String id = request.getParameter("id");
                    BookService bs = new BookService();
                    Book book = bs.getBook(id);
//                    out.print(book.getDesc());

                    String username = (String) request.getSession().getAttribute("username");

                    String thisTime = MyDate.getThis();

                    String s = bs.setBrowse(id, username, thisTime);
//                    out.print(s);


//                    out.print(bs.setBrowse(id,username,thisTime));
                %>

    <div class="layui-card" style="position:relative;top: -66px;width: 90%;background: rgba(255,255,255, 0);">
        <div class="layui-card-body">
            <span>书籍编号</span><input type="text" class="layui-input"  value="<%=  book.getId() %>">
            <p>书籍名</p><input type="text"   readonly class="layui-input"  value="<%= book.getName() %>">
            <p>作者</p><input type="text"   readonly class="layui-input"  value="<%=  book.getAuthor() %>">
            <p>图书馆</p><input type="text"  readonly  class="layui-input"  value="<%=  book.getLibraryId() %>">
        </div>
    </div>
    <div class="layui-card" style="position:relative;top: -66px;width: 90%;background: rgba(255,255,255, 0);">
        <div class="layui-card-body">
            <p>排序</p><input   readonly type="text" class="layui-input"  value="<%= book.getSortId() %>">
            <p>位置</p><input   readonly type="text" class="layui-input"  value="<%=  book.getPosition() %>">
            <p>标识</p><input  readonly  type="text" class="layui-input"  value="<%=  book.getStatus() %>">
            <p>描述</p> <textarea rows="5" class="layui-input"  cols="10"><%=  book.getDesc() %></textarea>
        </div>
    </div>

<%--            </form>--%>
        </div>



        <script src="layui/layui.js"></script>
        <script src="jQuery/js/jquery-1.11.0.min.js"></script>
        <script src="jQuery/js/ios-parallax.js"></script>


        <script>
            layui.use('layer', function(){
                var layer = layui.layer;

                layer.config({
                    skin: 'demo-class'
                })

            });


        </script>

        <script type="text/javascript">
            $(document).ready(function() {
                $('#top-image').iosParallax({
                    movementFactor: 500,
                    dampenFactor: 100
                });
            });
        </script>
</body>
</html>